<template>
<section>
  <div class="guod" >
    <div class="djs">
      <span class="t" @click="zhuan()">跳过{{i}}S</span>
    </div>
  <img src="http://www.sunlulu.club/img/gd.PNG" alt="">
 </div>
</section>

</template>
<style scoped>
.guod{
  width: 100%;
  height: 667px;
  position: relative;
}
img{
  width: 100%;
}
.djs{
  position: absolute;
  width: 60px;
  height: 30px;
  background:gray;
  opacity: .3;
  border-radius: 15px;
  top: 10px;
  right: 10px;
  line-height: 30px;

}
.t{
  color:#fff;
  font-size: 14px;

}
</style>
<script>
 export default {
  data() {
    return {
      i: 4,
    };
  },
  mounted() {
  this.get()
  },
  methods: {
    get() {
      this.i -= 1;
      console.log(this.i);
      if(this.i == 0){
        this.$router.push({name:'shouYe'})
      }
    this.time = setTimeout(()=>{
        this.get()
      },1000)
    },
    zhuan() {
      this.$router.push({name:'shouYe'})
    }
  },
  beforeDestroy() {
    clearTimeout(this.time);
  }
}
</script>
